function [position_legend,rBuy,rSell] = combine(price_path,rBuyMA,rSellMA,rBuyAR,rSellAR)
% combine AR and MA
rBuy = NaN(length(price_path),1);
rSell = NaN(length(price_path),1);
day_lag = 3;
hold on
h1 = plot(price_path);
for i=1:length(price_path) - day_lag
   if isnan(rBuyMA(i+day_lag))==0 && isnan(rBuyAR(i+day_lag))==0
       rBuy(i+day_lag) = rBuyMA(i+day_lag);
       h2 = plot(i,price_path(i),'o','MarkerEdgeColor','k',...
                 'MarkerFaceColor','r','MarkerSize',5);
   end
    if isnan(rSellMA(i+day_lag))==0 && isnan(rSellAR(i+day_lag))==0
       rSell(i+day_lag) = rSellMA(i+day_lag);
       h3 = plot(i,price_path(i),'o','MarkerEdgeColor','k',...
                 'MarkerFaceColor','g','MarkerSize',5);
   end
end
position_legend = [h1 h2 h3];